exports.Exam_blocksubject = function(_args) {
	
	var view = Ti.UI.createView({
		
		height:_args.heightview+_args.height_tableblock,
		width:_args.widthview,
		left:_args.leftview,
		top:_args.topview,
		backgroundColor:'transparent',
		touchEnabled:true,
	});
	
	
	var viewheader = Ti.UI.createView({
	   backgroundImage: _args.backgroundImage_viewheader,
	   // backgroundColo:'#e6e6e6',
	    left: 0,
	    top: 0,
	    height:_args.height_viewheader,
	    width: _args.width_viewheader,
	    touchEnabled: true,
	  
	});

	

	var lb1 = Titanium.UI.createLabel({
       text:_args.infolabel,
       color:'white',
       left:15,
       font:{
			fontSize:Ti.App.Properties.getString('fontsizeDefault'),
			fontWeight:'bold'
		},
       
    });
    viewheader.add(lb1)
	view.add(viewheader);
	
	var viewtableblock = Ti.UI.createView({
		
		height:_args.height_tableblock,
		width:_args.widthview,
		left:_args.leftview,
		top:viewheader.top+viewheader.height,
		backgroundColor:'transparent',
		backgroundImage:_args.backgroundImageSection,
		//backgroundColor:_args.backgroundColorSection,
		touchEnabled: true,
	});
	view.add(viewtableblock);
	
	var top_t=0
	var IsMod=0
	var lengthData=_args.datablock.length
	if(_args.datablock.length%2!=0)
	{
		IsMod=1;
		lengthData++;
	}
		
	
	
	for(var i = 0; i < lengthData; i++) {
	   if(i==lengthData-1 && IsMod==1)
	   {
	   		 var viewrightfinal = Ti.UI.createView({
					height:_args.height_table,
					width:'50%',//Titanium.Platform.displayCaps.platformWidth/2,
					right:0,
					top:top_t,
					backgroundColor:'transparent',
					//backgroundImage:_args.backgroundImageTable,
					borderRadius:0,
					borderColor:'black',
					borderWidth:1,
					touchEnabled:false,
			});
			viewtableblock.add(viewrightfinal);
	   }
	   else
	   {
	   		/*
	   		
			 */
	   		
	   		 var viewpanel=require('controls/Exam_blocksubject_table').Exam_blocksubject_table({
		  			height:_args.height_table,
					top:top_t,
					text:_args.datablock[i],
					image:_args.dataimage[i],
					backgroundColorSection:_args.backgroundColorSection,
					id:_args.dataID[i],
					TenMonHoc:_args.dataMonHoc[i].Name
			    })
					
			 viewtableblock.add(viewpanel);
			
					
			 if(i%2==0)
			 {
			 	viewpanel.left=0;
			 }
			 else
			 {
			 	viewpanel.right=0;
			   	top_t=top_t+viewpanel.height;
			 }
				 
			
			
				   
		}
	}
	
	
	
	
	
	//////////////////////EVEN///////////////////
	/*
	Ti.App.addEventListener('main_blocksubject:CreateLectureBySubject', function() {
		Ti.App.fireEvent('LectureMain:CreateLectureBySubject'); 
	});
	*/
	/////////////////////////////////////////////
	return view;
};